<?php


//��һ�����ӿ�����server 

$client=new swoole_client(SWOOLE_SOCK_TCP);

if(!$client->connect('127.0.0.1',9501)){
    echo "我的天连接失败了";
    exit;
  
}


fwrite(STDOUT,"请输入消息:");

$msg=trim(fgets(STDIN));

//向swoole server 发送

$client->send($msg);


//接收来自swoole的返回的消息

$result=$client->recv();

echo $result;